﻿					
					<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
					
					<div class="content">
						<div class="module">
							<div class="module-body">														
								<section class="docs">
									<h4>FAQ</h4>
								</section>
								
								<div class="stream-list">
									<div class="media stream">
										<div class="media-body">
											<div class="stream-headline">
												<h5 class="stream-author">
													无法通过SSH连接登录节点
												</h5>
											</div>
											<!--/.stream-headline-->
											<div class="stream-respond">
												<div class="stream-text">
													 从办公区连接登录节点需要首先通过VPN服务器与集群网络建立连接，查看<a href="<c:url value="/userguide/vpn" />">VPN使用</a>了解如何访问VPN服务器。如果确认VPN连接正常，但仍然无法访问登录节点，请与管理员联系。 
												</div>
											</div>
											<!--/.stream-respond-->
										</div>
									</div>
									<!--/.media .stream-->

									<div class="media stream">
										<div class="media-body">
											<div class="stream-headline">
												<h5 class="stream-author">
													如何修改VPN用户密码
												</h5>
											</div>
											<!--/.stream-headline-->
											<div class="stream-respond">
												<div class="stream-text">
													查看<a href="<c:url value="/userguide/vpn" />">VPN使用</a>了解如何修改VPN密码。 
												</div>
											</div>
											<!--/.stream-respond-->
										</div>
									</div>
									<!--/.media .stream-->

								</div>								
							</div>
						</div>
					</div>

					<script src="<c:url value="/resources/scripts/jquery-1.9.1.min.js"/>" type="text/javascript"></script>
					<script src="<c:url value="/resources/scripts/jquery-ui-1.10.1.custom.min.js"/>" type="text/javascript"></script>
					<script src="<c:url value="/resources/bootstrap/js/bootstrap.min.js"/>" type="text/javascript"></script>
					<script src="<c:url value="/resources/scripts/flot/jquery.flot.js"/>" type="text/javascript"></script>
<%-- 					<script src="<c:url value="/resources/scripts/flot/jquery.flot.resize.js"/>" type="text/javascript"></script> --%>
<%-- 					<script src="<c:url value="/resources/scripts/datatables/jquery.dataTables.js"/>" type="text/javascript"></script> --%>
<%-- 					<script src="<c:url value="/resources/scripts/common.js"/>" type="text/javascript"></script>					 --%>
			
					<script type="text/javascript">
						$(document).ready(function() {
							$("#message-box1").hide();
						});
						
						$("#submit-button").click(function(){
							title = $.trim($("#title1").val());
							category = $("#category1").val();
							content = $("#content1").val();
							name = $("#name1").val();
							
							if ((title.length <= 0) || (title.length > 30)) {
								$("#title1").focus()
								return false;	// 不刷新页面
							} else if (category == "") {
								$("#category1").focus()
								return false;
							} else if ((content.length <= 0) || (content.length > 1000)) {
								$("#content1").focus()
								return false;
							} else if ((name.length <= 0) || (name.length > 1000)) {
								$("#name1").focus()
								return false;
							} else {
								$.ajax({
									url: "<c:url value="/feedback" />",
									type: "POST",
									data: $('#feedback-form').serialize(),
									    
									success: function(data, textStatus, jqXHR) {
										if (data == "ok") {
											$("#message-box1").attr("class", "controls alert alert-success");
											$("#message-content").text("提交成功");
											$("#message-box1").show().fadeOut(5000);
										} else {
											$("#message-box1").attr("class", "controls alert alert-error");
											$("#message-content").text("提交失败");
											$("#message-box1").show().fadeOut(5000);									
										}
									},
									 
									error: function(jqXHR, textStatus, errorThrown){
										$("#message-box1").attr("class", "controls alert alert-error");
										$("#message-content").text("数据传输失败");
										$("#message-box1").show().fadeOut(5000);
										// alert(jqXHR.responseText);
									},
									
									beforeSend: function(jqXHR, settings) {
										 $('#submit-button').attr("disabled", true);
									},
									
									complete: function(jqXHR, textStatus) {
										 $('#submit-button').attr("disabled", false);
									},
								 });					
							}
						});
					</script>